import request from '@/utils/request'
// 列表
export function getCategoryList(params,type) {
  return request({
    url: '/admin/sort/'+type,
    method: 'get',
    params
  })
}
// 删除
export function delCategoryList(id,type) {
  return request({
    url: '/admin/sort/'+type+'/'+id,
    method: 'DELETE',
  })
}
// 新增提交
export function addCategoryForm(data,type) {
  return request({
    url: '/admin/sort/'+type,
    method: 'post',
    data
  })
}
// 编辑提交
export function addCategoryFormEditor(data,id,type) {
  return request({
    url: '/admin/sort/'+type+'/'+id,
    method: 'put',
    data
  })
}
// 编辑获取
export function editorCategoryForm(type,id) {
  return request({
    url: '/admin/sort/'+type+'/'+id,
    method: 'get'
  })
}
// 排序
export function sortData(data,type) {
  return request({
    url: '/admin/sort/'+type,
    method: 'post',
    data
  })
}



